package file;

import java.io.File;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/3/6
 **/
public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo.txt");
        String name = file.getName();
        long length = file.length();
        System.out.println(name);
        System.out.println(length);
        boolean isf = file.isFile();
        boolean b = file.canRead();
        boolean b1 = file.canWrite();
        System.out.println(isf);
        System.out.println(b);
        System.out.println(b1);
    }
}
